package com.qingfeng.provide.controller;

import com.qingfeng.core.data.ResultData;
import com.qingfeng.core.entity.qingfeng.Cash;
import com.qingfeng.provide.service.CashService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;

/**
 * @description: 提现
 * @author:LWY
 * @date: 2017/11/15 16:05
 * @modified:
 */
@RestController
@RequestMapping("/cash")
public class CashController {
    @Autowired
    CashService cashService;

    /**
     * 提现申请
     *
     * @param request
     * @return
     */
    @RequestMapping("/aaply")
    public ResultData aaply(HttpServletRequest request, Cash cash) {
        String user_id = request.getParameter("id");
        cash.setUser_id(user_id);
        cashService.apply(cash);
        return new ResultData(ResultData.SUCCESS, "提现已经申请,客服人员每周六24小时内，统一给大家发放！", "");
    }
}
